package com.plian.system.entity.pm.listedcompany;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.plian.Tools.DateUtil;
import com.plian.system.mybatis.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

@Data
@TableName("pm_firm_main_indicators")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "FirmMainIndicators对象", description = "上市公司-主要指标")
public class FirmMainIndicators extends BaseEntity {

    @ApiModelProperty(value = "父类上市公司Id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long baseFirmId;

    @ApiModelProperty(value = "序号")
    private Integer serialNumber;

    @DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
    @JsonFormat(pattern = DateUtil.PATTERN_DATE)
    @ApiModelProperty(value = "科目")
    private Date time;

    @ApiModelProperty(value = "季度末的股价")
    private BigDecimal seasonStockPrice;

    @ApiModelProperty(value = "市值")
    private String marketValue;

    @ApiModelProperty(value = "总资产")
    private String totalAssets;

    @ApiModelProperty(value = "归母净资产")
    private String belongParentCompanyAssets;

    @ApiModelProperty(value = "归母净利润")
    private String belongParentCompanyRoe;

    @ApiModelProperty(value = "市盈率")
    private String ttm;

    @ApiModelProperty(value = "市净率")
    private String pb;

    @TableField(exist = false)
    @ApiModelProperty(value = "上市公司名称")
    private String listedFirmName;

    @TableField(exist = false)
    @ApiModelProperty(value = "年度")
    private String year;
}
